package com.starbaba.core.web.taglib.ace;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.apache.struts2.components.Component;
import org.apache.struts2.views.jsp.ComponentTagSupport;

import com.opensymphony.xwork2.util.ValueStack;
import com.starbaba.core.web.taglib.ace.component.AceCheckboxComponent;

@SuppressWarnings("serial")
public class AceCheckboxTag extends ComponentTagSupport{
	private Object list;
	private String name;
	private String value;

	@Override
	public Component getBean(ValueStack stack, HttpServletRequest req, HttpServletResponse res) {
		// TODO Auto-generated method stub
		return new AceCheckboxComponent(stack, req);
	}
	
	@Override
	protected void populateParams() {
		super.populateParams();
		AceCheckboxComponent checkboxComponent = (AceCheckboxComponent)this.getComponent();
		checkboxComponent.setList(list);
		checkboxComponent.setName(name);
		checkboxComponent.setValue(value);
    }

	public Object getList() {
		return list;
	}

	public void setList(Object list) {
		this.list = list;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getValue() {
		return value;
	}

	public void setValue(String value) {
		this.value = value;
	}
}
